package com.twu.biblioteca;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class BibliotecaApp{

    public BibliotecaApp(){

        welcomeMenuGUI();
    }
    public static void main(String [] args) {

        new BibliotecaApp();
    }
    private void welcomeMenuGUI() {
        final JFrame welcomeFrame = new JFrame("Welcome to TW Biblioteca");
        welcomeFrame.setBounds(800, 500, 400, 75);
        welcomeFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JButton closeMe = new JButton("Close");
        closeMe.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                welcomeFrame.setVisible(false);
                mainMenu();
            }
        });
        welcomeFrame.getContentPane().add(closeMe);
        welcomeFrame.setVisible(true);
    }

    private void mainMenu(){
        System.out.println("hello governor!");
    }
}
